1. Field of the Invention
The present invention generally relates to data processing systems. More particularly, embodiments of the present invention related to handling requests made to a database.
2. Description of the Related Art
Databases are computerized information storage and retrieval systems. A relational database management system is a computer database management system (DBMS) that uses relational techniques for storing and retrieving data. Relational databases are computerized information storage and retrieval systems in which data in the form of tables (formally denominated “relations”) are typically stored for use on disk drives or similar mass data stores. A “table” includes a set of rows (formally denominated “tuples” or “records”) spanning several columns. Reference is made to C. J. Date, An Introduction to Database Systems, 6th edition, Addison-Wesley Publishing Co. Reading. Mass. (1994) for a comprehensive general treatment of the relational database art.
An DBMS is structured to accept commands to store, retrieve and delete data using high-level query languages such as the Structured Query Language (SQL). The term “query” denominates a set of commands for retrieving data from a stored database. The SQL standard has been promulgated by the International Standards Association since 1986.
In a DBMS, a requesting entity (e.g., an application or the operating system) demands access to a specified database by issuing a database access request. Such requests may include, for instance, simple catalog lookup requests or transactions and combinations of transactions that operate to read, change and add specified records in the database. A catalog lookup and add request occurs, for example, when a requesting entity requests to add triggers or constraints to a file.
When triggers or constraints are added to a file at the request of a requesting entity, a synchronous communication process takes place between the requesting entity and a catalog manager. The catalog manager is responsible for determining whether the requested name is available by accessing one or more of a plurality of catalogs. This step is necessary because both triggers and constraints (and, more generally, any named element) must have names that are unique with the system.
FIG. 1 shows a processing system 100 illustrating a synchronous communication process. The processing system 100 includes a requesting entity 102, a catalog server 104 and a catalog database 106. An interface 108 is disposed between the requesting entity 102 and the catalog server 104. A communication process is initiated when the requesting entity 102 issues a request for a name (e.g., a trigger name, a constraint name, etc.) to the catalog server 104. The interface 108 formats the request and forwards the request to the catalog server 104. The catalog server 104 then determines whether the request can be satisfied (e.g., whether the name being requested by the application is available) by accessing the catalog database 106. A response is then returned from the catalog server 104 to the requesting entity 102.
For a synchronous request, the requesting entity 102 supplies the address of a response queue in the request to the catalog server 104. After making the request, the requesting entity 102 waits for a response in the response queue. During this time, the requesting entity 102 is unavailable to handle other processing. Once the requesting entity 102 receives a response from the catalog server 104, the requesting entity 102 is free to resume processing.
A problem occurs when the catalog server 104 is unavailable to handle requests from the requesting entity 102. The situation may occur, for example, when the system 100 is installing new operating system code or during an initial program load (IPL) when the system 100 is making a transition from a powered down state to a usable state. In this case, the requesting entity 102 has no means to determine whether a name is available for a requested element (e.g., a trigger or a constraint). In addition, because the request is synchronous, the requesting entity 102 is unavailable for processing while waiting for a response from the catalog server 104. Accordingly, the ability of the system 100 to operate efficiently and effectively is compromised.
Therefore, there is a need for a system and a method for handling catalog requests when a catalog server is unavailable.